﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterForum.master" AutoEventWireup="true" CodeFile="index.aspx.cs" Inherits="index" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
    <link rel="stylesheet" type="text/css" href="css/forum.css" />
    <title>Benvenuto</title>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server" Visible="True">
    <asp:Panel ID="Category" runat="server"><% loadCategory(); %></asp:Panel>
    <asp:Panel ID="Argoment" runat="server" Visible="False">
        <asp:HyperLink ID="HL" runat="server" NavigateUrl="~/index.aspx">Torna alle categorie</asp:HyperLink>
        <% loadArgoment(Request.QueryString["cat"]); %>
        <%if(Session["islogged"] != null){ %>
        <asp:Button ID="addTopic" runat="server" Text="Aggiungi TOPIC" OnClick="addTopic_Click" />
        <asp:Panel ID="AggiungiTopic" runat="server" Visible="false">
            Nome Topic:
            <asp:TextBox ID="nomeTopic" runat="server"></asp:TextBox>
            <asp:Button ID="sendAddTopic" runat="server" Text="Aggiungi" OnClick="sendAddTopic_Click" />

        </asp:Panel>
        <%} %>


    </asp:Panel>
    <asp:Panel ID="Topic" runat="server" Visible="False" Wrap="False">
        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/index.aspx">Torna alle categorie</asp:HyperLink>
        <%Response.Write("<br / > <a href=\"index.aspx?cat=" + Request.QueryString["cat"] + "\"> Torna al topic</a> "); %>
        <% loadPost(Request.QueryString["topic"]); %>
        <%if(Session["islogged"] != null){ %>
        <center>
            <asp:TextBox ID="TBtesto" runat="server" TextMode="MultiLine" Width="70%" Height="150px" Style="resize: none;"></asp:TextBox>
            <br />
            <asp:Button ID="BInviaTxt" runat="server" Text="Invia" Width="90px" Height="30px" OnClick="BInviaTxt_Click" />
        </center>
        
        <%} %>
        <br />
        <br />
        <br />
    </asp:Panel>
</asp:Content>



